<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <title>Title</title>
    <meta charset="UTF-8">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css">
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/js/bootstrap.min.js"></script>
    <script src="http://code.jquery.com/jquery-2.1.4.min.js"></script>
    <link href="https://cdn.datatables.net/1.10.19/css/jquery.dataTables.min.css" rel="stylesheet" />
    <script src="https://cdn.datatables.net/1.10.19/js/jquery.dataTables.min.js"></script>
    <style>
        #showbox {
            min-width: 50px;
            min-height: 20px;
            font: 100 14px/1 "微软雅黑";
            border: 1px solid #000000;
            display: none;
            position: absolute;
            left: 0;
            top: 0;
            background-color: #fcffb7;
            padding: 5px;
        }
    </style>
</head>
<script>
    $(document).ready( function () {
        $('#myTable').DataTable({"paging": false, "ordering": true, "info": false, "searching": false});

        $(".myOne").hover(function(e){
            var num = this.parentElement.innerText;
            $("#showbox").css("left", e.clientX).css("top", ($(this).offset().top + $(this)[0].clientHeight));
            $("#showbox").html(num);
            $("#showbox").show();
        },function(){
            $("#showbox").hide();
        });
    });

</script>
<body>
<br>
<form action="/upload" method="post" enctype="multipart/form-data">
    <input type="file" name="iFile">
    <br>
    <input type="submit" value="上传" class="btn btn-success">
</form>
<br>

<div class="table-demo">
    <table  id="myTable"  class="table table-striped table-bordered">
        <thead  class="table-light">
            <tr>
                <th scope="col"> C.1.1 </th>
                <th scope="col"> D.1 </th>
                <th scope="col"> D.1-birthday </th>
                <th scope="col"> E.i.1.1a </th>
                <th scope="col"> G.k.2.2 </th>
            </tr>
        </thead>

        <tbody>
        <span th:each="icsr : ${icsrs}">
            <tr>
                <td class="myOne" >
                        [[${icsr.code}]]
                </td>
                <td>
                        [[${icsr.name}]]
                </td>
                <td>
                        [[${icsr.birthday}]]
                </td>
                <td>
                        [[${icsr.source}]]
                </td>
                <td>
                        [[${icsr.drug}]]
                </td>
            </tr>
            </span>
        </tbody>
    </table>
</div>
<div id="showbox"></div>
</body>
</html>